package com.dwms.controller;

import com.dwms.entity.PageResponse;
import com.dwms.entity.QueryRequest;
import com.dwms.entity.Result;
import com.dwms.entity.declare.jeInboundDetail.request.JeInboundDetailQueryRequest;
import com.dwms.entity.declare.jeInboundDetail.request.JeInboundDetailRequest;
import com.dwms.entity.declare.jeInboundDetail.response.JeInboundDetailResponse;
import com.dwms.feign.declare.JeInboundDetailFeignClient;
import com.dwms.utils.WebUtil;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: JeInboundDetailController
 * @Description: JeInboundDetail
 * @Create 2025-09-28 20:48:06
 * @Author WH
 * @Since 1.0.0
**/
@Tag(name = "金二入库明细信息")
@RestController
@RequestMapping(value = "/declare/jeInboundDetail")
@RequiredArgsConstructor
public class JeInboundDetailController {

    private final HttpServletRequest request;
    private final JeInboundDetailFeignClient jeInboundDetailService;

    /**
     * 分页查询
     *
     * @param query
     *          查询参数
     * @return
     */
    @PostMapping("/findPage")
    public Result<PageResponse<JeInboundDetailResponse>> findPage(@RequestBody JeInboundDetailQueryRequest query) {
        WebUtil.getAdminRequest(request, query);
        return jeInboundDetailService.findPage(query);

    }

}
